﻿foreach ($t in [float], [int], [string]) { "0123.45" -as $t }

# -as returns null if the conversion doesn't succeed
$x = "abc"
$y = $x -as [int]
write "`$y -is `$null? $($y -eq $null)"
